<?php
/**
 * 订单备份
 * @author Administrator
 * @property order_bak_mdl $bg_order_bak
 */
class Order_bak extends Bg_Controller{
	
	public function __construct(){
		parent::__construct();
	}
	
	/**
	 * 备份并删除旧订单
	 */
	public function oldOrderBak(){
	
		$tableIdList = array(1);
		$this->load->model('bg/order_bak_mdl','bg_order_bak');
		
		foreach ( $tableIdList as $tableId){
			
			$tableNameBak = 'hs_order_bak_'.$tableId;//备份表名
			$tableName = 'hs_order_'.$tableId;//原始表名
			
			$res = $this->bg_order_bak->orderBak($tableNameBak,$tableName);
			
		}
		
		echo 'ok';
		
	}
	
}